#ifndef _MA_JIANG_2_TYPE_HPP_20120625
#define _MA_JIANG_2_TYPE_HPP_20120625

class Player;

namespace majiang2
{
	const static int MAX_WALL_SIZE  = 32;
	const static int MAX_ROLE_CARD  = 14;

	struct WallItem
	{
		uint8_t _cards[2];
		WallItem() { _cards[0] = _cards[1] = 0; }
	};
	
	struct Wall
	{
		int        _consumer;
		WallItem   _items[MAX_WALL_SIZE];

		Wall()
		{
			memset(this, 0, sizeof(*this));
		}
	};

	struct RoleCardItem
	{
		uint8_t  _num;
		uint8_t  _cards[MAX_ROLE_CARD];

		RoleCardItem() { memset(this, 0, sizeof(*this)); }
	};

	struct RoleCard
	{
		Player *     _player;
		RoleCardItem _in;
		RoleCardItem _out;

		RoleCard() : _player(NULL), _in(), _out() {}
	};
};

#endif

